package com.etone.smartAudit.mapstruct;

import com.etone.smartAudit.domain.AccountInfo;
import com.etone.smartAudit.dto.accountInfo.AccountInfoDTO;
import com.etone.smartAudit.vo.accountInfo.AccountInfoVO;
import com.etone.smartAudit.vo.item.ItemExpansionSourceVO;
import org.mapstruct.*;

/**
 * @author: sovy
 * @date: 2020/11/13
 * @description:
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface AccountInfoMapstruct {

    AccountInfoVO getAccountInfoVO(AccountInfo accountInfo);

    void copy2AccountInfoDTO(@MappingTarget AccountInfo accountInfo, AccountInfoDTO accountInfoDTO);

    @Mappings({
            @Mapping(target = "id", ignore = true),
            @Mapping(target = "type", ignore = true),
            @Mapping(target = "schemaName", source = "databaseSchema"),

    })
    void copy2AccountInfo(@MappingTarget AccountInfo accountInfo, ItemExpansionSourceVO itemExpansionSource);
}
